package com.tul.exercise.base.innerclass.chapter10_5;


/**
 * @Description 《java编程思想》10.5 示例 1
 *  作用域的内部类
 **/
public class Pacel6 {

    private void internalTracking(boolean b) {
        if (b) {
            class TrackingSlip{
                private String id;

                TrackingSlip(String s) {
                    id = s;
                }

                String getSlip() {
                    return id;
                }
            }
            TrackingSlip ts = new TrackingSlip("slip");
            String s = ts.getSlip();
        }
    }

    public void track() {
        internalTracking(true);
    }
}
